home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 201-225 / disk_222 / plplot / src / source.zoo / setphy.c < prev    next >
C/C++ Source or Header  |  1989-05-15  |  574b  |  23 lines

  1. /* Sets up physical limits of plotting device and the mapping between */
  2. /* normalized device coordinates and physical coordinates */
  3.  
  4. #include "plplot.h"
  5.  
  6. void setphy(xmin,xmax,ymin,ymax)
  7. int xmin,xmax,ymin,ymax;
  8. {
  9.     float xpmm, ypmm, mpxscl, mpyscl;
  10.  
  11.     sphy(xmin,xmax,ymin,ymax);
  12.     sdp((double)(xmax-xmin),(double)(xmin),(double)(ymax-ymin),
  13.          (double)(ymin));
  14.  
  15.     gpixmm(&xpmm,&ypmm);
  16.     mpxscl = xpmm;
  17.     if (xmax <= xmin) mpxscl = -xpmm;
  18.     mpyscl = ypmm;
  19.     if (ymax <= ymin) mpyscl = -ypmm;
  20.     smp(mpxscl,(double)(xmin), mpyscl,(double)(ymin));
  21. }
  22.  
  23.